package com.xxp.mapper;

import com.xxp.controller.request.UserPageRequest;
import com.xxp.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.mybatis.spring.annotation.MapperScan;

import java.util.List;

@Mapper
public interface UserMapper {
    /**
     * 查询所有
     * @return
     */
    List<User> list();

    /**
     * 分页查询
     * @param userPageRequest
     */
    List<User> listByCondition(UserPageRequest userPageRequest);

    /**
     * 新增
     */
    void save(User user);

    /**
     * 根据ID查询
     * @param id
     */
    User getById(Integer id);
    /**
     * 根据ID修改
     */
    void update(User user);

    void deleteById(Integer id);
}
